package com.lhf.azkaban.springbatch;

import com.lhf.azkaban.springbatch.example.utils.DateUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.time.LocalDateTime;

/**
 * @author 95780
 */
@EnableBatchProcessing
@EnableTransactionManagement // 开启事务管理
@MapperScan("com.lhf.azkaban.springbatch.example.mapper")
@SpringBootApplication
public class AzkabanspringbatchApplication {
    private static final Logger logger = LogManager.getLogger(AzkabanspringbatchApplication.class);

    public static void main(String[] args) {

        SpringApplication.run(AzkabanspringbatchApplication.class, args);
        logger.info("======AzkabanspringbatchApplication Begin======time:   " + DateUtil.parseDateTime(LocalDateTime.now(), DateUtil.PATTERN_DEFAULT_DATA));
        logger.info("AzkabanspringbatchApplication RUN ......");
    }

}
